#include "data_collector.h"


namespace vehicle {
namespace map {

    void DataHub::OnVehicleStatus(const lcm::ReceiveBuffer* rbuf, const std::string& chan)
    {
        lcmtypes::vehicle_status_t vehicle_status;
        int pos = vehicle_status.decode(rbuf->data,0,rbuf->data_size);
        DataProviderVehicleStatusInfo::Instance()->Update(vehicle_status);
    }

    void DataHub::OnGPSData(const lcm::ReceiveBuffer* rbuf, const std::string& chan)
    {
        lcmtypes::gps_imu_info_t gps_imu_info;
        int pos = gps_imu_info.decode(rbuf->data,0,rbuf->data_size);
        DataProviderGPSIMUInfo::Instance()->Update(gps_imu_info);
    }
}
}
